<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>求任意个数的最大值</title>
    <script>
        function fn() {
            var max = arguments[0]
            for (var i = 1; i < arguments.length; i++) {
                if (arguments[i] > max ) {
                    max = arguments[i]
                }
            } 
            return max
        }
        console.log(fn(1,33,4,6));
    </script>
    <script>
        function one() {
            var two=arguments[0]
            for (var i = 1;i < arguments.length; i++) {
                if(arguments[i] > two){
                    two = arguments[i]
                }
            }
            return two
        }
        console.log(fn(1,33,4,55,103));
    </script>
</head>
<body>
    
</body>
</html>